import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    // 登录页
    {
      path: '/',
      component: resolve => require(['@/views/login.vue'], resolve),
    },
    // 首页
    {
      path: '/index',
      component: resolve => require(['@/views/index.vue'], resolve),
    },
    // 收入流水
    {
      path: '/income',
      component: resolve => require(['@/views/income.vue'], resolve),
    },
    // 推荐码
    {
      path: '/referral-code',
      component: resolve => require(['@/views/referral-code.vue'], resolve),
    },
    // 分成管理
    {
      path: '/divided-management',
      component: resolve => require(['@/views/divided-management.vue'], resolve),
    },
    // 用户详情
    {
      path: '/income-detail',
      component: resolve => require(['@/views/income-detail.vue'], resolve),
    },
    // 业务员管理
    {
      path: '/salesman-management',
      component: resolve => require(['@/views/salesman-management.vue'], resolve),
    },
    // 业务员搜索
    {
      path: '/search-salesman',
      component: resolve => require(['@/views/search-salesman.vue'], resolve),
    },
    // 业务员详情
    {
      path: '/salesman-detail',
      component: resolve => require(['@/views/salesman-detail.vue'], resolve),
    },
    // 增加业务员
    {
      path: '/salesman-add',
      component: resolve => require(['@/views/salesman-add.vue'], resolve),
    },
    // 我的客户
    {
      path: '/my-client',
      component: resolve => require(['@/views/my-client.vue'], resolve),
    },
    // 无网络
    {
      path: '/no-net',
      component: resolve => require(['@/views/no-net.vue'], resolve),
    }
  ]
})
